<template>
  <div id="app">
    <layout></layout>
  </div>
</template>

<script>
import Layout from './layout'
export default {
  name: 'app',
  components: {
    Layout
  },
  mounted () {
    // 监控主进程发的消息,进行路由跳转
    const { ipcRenderer } = require('electron')
    ipcRenderer.on('router-to-path', (event, arg) => {
      console.log(arg) // prints "pong"
      // debugger
      this.$router.replace(arg)
    })
    // require('electron').ipcRenderer.on('ping', (event, message) => {
    //   console.log(message) // Prints 'whoooooooh!'
    // })
  }
}
</script>

<style>
  #app {
    width: 800px;
    height: 540px;
    /*font-family: 'Avenir', Helvetica, Arial, sans-serif;*/
    /*-webkit-font-smoothing: antialiased;*/
    /*-moz-osx-font-smoothing: grayscale;*/
    /*text-align: center;*/
    /*color: #2c3e50;*/
    /*margin-top: 60px;*/
  }
  body {
    display: block;
    margin: 0;
  }
</style>
